<?php
/**
 * Model hostingu
 * @author Tomas Srna
 * @package bakalarka
 */

class HostingModel extends Model
{
	protected function __construct()
	{
		$this->_table = 'hosting';
		// $name, $datatype, $pk, $allownull, $default, $autoincrement
		$this->_fields = array(
			new Field('id', 'int', true, false, NULL, true),
			new Field('updated', 'timestamp'),
			new Field('name', 'varchar(100)'),
			new Field('root', 'varchar(100)'),
			new Field('documentroot', 'varchar(100)'),
			new Field('space', 'int'),
			new Field('used', 'int', false, false, '0'),
			new Field('dbcount', 'int'),
			new Field('servername', 'varchar(50)'),
			new Field('serveralias', 'varchar(100)', false, true),
			new Field('adminmail', 'varchar(50)', false, true),
			new Field('php', 'tinyint(1)'),
			new Field('ssl', 'tinyint(1)'),
			new Field('openbasedir', 'varchar(100)', false, true),
			new Field('subdomaindir', 'varchar(100)', false, true),
			new Field('symlinks', 'tinyint(1)'),
			new Field('indexes', 'tinyint(1)'),
			new Field('allowoverride', 'tinyint(1)'),
			new Field('active', 'tinyint(1)'),
		);
	}
}
